const int potpin = 0;
const int ledpin = 11;

int val = 0;

void setup() {
  // put your setup code here, to run once:
  pinMode(ledpin,OUTPUT);
  Serial.begin(9600);
  

}

void loop() {

  val = analogRead(potpin);
  Serial.println(val);
  analogWrite(ledpin,val);
  delay(10);
  // put your main code here, to run repeatedly:
  //val = analogRead(potpin);
  //Serial.println(val);
  //analogWrite(ledpin,val);
   //if(digitalRead(potpin) == 0){
   // digitalWrite(ledpin,HIGH);
   // };
  //Serial.println(digitalRead(potpin));
  //delay(1000);

}
